// @表示src目录
// import 是ES6的模块语法，引入模块
import http from "@/http/http";

const url = "dorms";

export default {
    getListByPage: function(data, params) {
        return http.post(`${url}/list.do`, data, {
            params
        });
    },
    del: function(id) {
        return http.get(`${url}/del.do`, {
            params: {
                id
            }
        });
    },
    delBatch: function(ids) {
        return http.get(`${url}/delBatch.do`, {
            params: {
                ids
            }
        });
    },
    save: function(data) {
        return http.post(`${url}/save.do`, data);
    },
    edit: function(id) {
        return http.get(`${url}/edit.do`, {
            params: {
                id
            }
        });
    },
    findAll: function() {
        return http.get(`${url}/findAll.do`);
    }
}